Best way to prevent Google from indexing a directory [duplicate]

Posted by Gkhan14 on Pro Webmasters See other posts from Pro Webmasters or by Gkhan14
Published on 2013-06-30T17:28:44Z Indexed on 2013/06/30 22:28 UTC
Read the original article Hit count: 392

This question already has an answer here:

I've researched many methods on how to prevent Google/other search engines from crawling a specific directory. The two most popular ones I've seen are:

  1. Adding it into the robots.txt file: Disallow: /directory/
  2. Adding a meta tag: <meta name="robots" content="noindex, nofollow">

Which method would work the best? I want this directory to remain "invisible" from search engines so it does not affect any of my site's ranking.

In other words, I want this directory to be neutral/invisible and "just there." I don't want it to affect any ranking. Which method would be the best to achieve this?

© Pro Webmasters or respective owner

Related posts about seo

Related posts about google